require("./index.less")

var indexList = require('./indexList.string');
var _util = require("util/util.js");
var _product = require("service/product-service.js")


var page = {
  init : function () {
    this.loadIndexList();
  },
  loadIndexList : function(){
    _product.getProductList({pageSize:4},function(res){
  		var indexListHtml = _util.renderHtml(indexList,res);
  		$("#indexListContainer").html(indexListHtml);
  	},function(err){
  		console.log(err);
  	})
  },
  bindEvent : function(){
    
  }
}
$(function(){
  page.init();
})